//
//  Part.swift
//  Composite
//
//  Created by LY on 2017/10/26.
//  Copyright © 2017年 DesignPatterns. All rights reserved.
//

import Foundation
class Part{
    let name : String
    let price : Float
    ///遍历构造器
    /// - parameters:
    ///    - name : 名字
    ///    - price : 价格
    ///- time: 构造时间
    ///- returns: 返回可用对象
    ///- author: Maguns
    ///- important:这很重要！
    ///- warning:警告
    ///- attention: 注意 
    ///- note: 标注
    ///- version: 1.0
    ///- throws: 抛出异常
    init(name:String,price:Float) {
        self.name = name
        self.price = price
    }
}
///  符合构造对象
/// TODO: init()action
/// FIXME: ？标签
class CompositePart{
    let name : String
    let part : [Part]
    init(name : String,part:Part...) {
        self.name = name
        self.part = part
    }
}
